

/* 去除浏览器自身样式 */
*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}



/* 公共样式 */
:root{
    /* 颜色 */
     /* 颜色 */
     --body-color: #fff;
     --sidebar-color: #fff;
     --primary-color: #695cfe;
     --primary-color-light: #f6f5ff;
     --toggle-color: #ddd;
     --text-color: #707070;

     --a-color:black;
     --topbar-color:#fff;
 
     /* 过渡效果 */
     --tran-02: all 0.2s ease;
     --tran-03: all 0.3s ease;
}

/* 设置body */
body{
    min-height: 100vh;
    background-color: var(--body-color);
    transition: var(--tran-03);
}

.acolor{
    color: var(--a-color);
}


/* 使用js为body添加class */
/* 当body标签拥有dark类名的时候的样式 */
body.dark{
    --a-color:#fff;
    --topbar-color:black;
    --body-color:#18191a;
    --sidebar-color:#242526;
    --primary-color:#3a3b3c;
    --primary-color-light:#3a3b3c;
    --toggle-color:#fff;
    --text-color:#fff;
}



/* sidebar上的初始化样式 */
.sidebar{
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 250px;
    padding: 10px 14px;
    background: var(--sidebar-color);
    transition: var(--tran-03);
    z-index: 100;
}


/* 侧边栏合上时 */
.sidebar.close{
    width: 88px;
}

/* 侧边栏的li */
.sidebar li{
    height: 50px;
    list-style: none;
    display: flex;
    align-items: center;
    margin-top: 10px;
}

/* 侧边栏的头像和图标 */
.sidebar header .image,.sidebar .icon{
    min-width: 60px;
    border-radius: 6px;
}

/* 侧边栏图标 */
.sidebar .icon{
    min-width: 60px;
    border-radius: 6px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

/* 侧边栏文字和侧边栏图标 */
.sidebar .text,.sidebar .icon{
    color: var(--text-color);
    transition: var(--tran-03);
}

/* 设置侧边栏文字样式 */
.sidebar .text{
    font-size: 17px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 1;
}

/* 当关闭时，字完全消失 */
.sidebar.close .text{
    opacity: 0; 
}

/* header部分样式 */
.sidebar header{
    position: relative;
}

.sidebar header .user-info{
    display: flex;
    align-items: center;
}

.sidebar header .nickname{
    display: flex;
    flex-direction: column;
}

header .user-info .name{
    margin-top: 2px;
    font-size: 18px;
    font-weight: 600;
}

header .user-info .identify{
    font-size: 16px;
    margin-top: -2px;
    display: block;
}

.sidebar header .image{
    display: flex;
    align-items: center;
    justify-content: center;
}
.sidebar header .image img{
    width: 40px;
    border-radius: 6px;
}

/* 设置侧边栏开关 */
.sidebar header .toggle{
    position: absolute;
    top: 50%;
    right: -25px;
    transform: translateY(-50%) rotate(180deg);
    height: 25px;
    width: 25px;
    background-color: var(--primary-color);
    color: var(--sidebar-color);
    display: flex;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    cursor: pointer;
    transition: var(--tran-03);
}

body.dark .sidebar header .toggle{
    color: var(--text-color);
}

.sidebar.close .toggle{
    transform: translateY(-50%) rotate(0deg);
}

.sidebar .menu{
    margin-top: 40px;
}

.sidebar li.search-box{
    border-radius: 6px;
    background-color: var(--primary-color-light);
    cursor: pointer;
    transition: var(--tran-03);
}
.sidebar li.search-box input{
    height: 100%;
    width: 100%;
    outline: none;
    border: none;
    background-color: var(--primary-color-light);
    color: var(--text-color);
    border-radius: 6px;
    font-size: 17px;
    font-weight: 500;
    transition: var(--tran-03);
}
.sidebar li a{
    list-style: none;
    height: 100%;
    background-color: transparent;
    display: flex;
    align-items: center;
height: 100%;
width: 100%;
border-radius: 6px;
text-decoration: none;
transition: var(--tran-03);
}

.sidebar li a:hover{
    background-color: var(--primary-color);
}
.sidebar li a:hover .icon,.sidebar li a:hover .text{
    color: var(--sidebar-color);
}

body.dark .sidebar li a:hover .icon,
body.dark .sidebar li a:hover .text{
    color: var(--text-color);
}

.sidebar .menu-bar{
    height: calc(100% - 55px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow-y: scroll;
}

.menu-bar::-webkit-scrollbar{
    display: none;
}

.sidebar .menu-bar .mode{
    border-radius: 6px;
    background-color: var(--primary-color-light);
    position: relative;
    transition-timing-function: var(--tran-03);
}

.menu-bar .mode .sun-moon{
    height: 50px;
    width: 60px;
}
.mode .sun-moon i{
    position: absolute;
}

.mode .sun-moon i.sun{
    opacity: 0;
}
body.dark .mode .sun-moon i.sun{
    opacity: 1;
}
body.dark .mode .sun-moon i.moon{
    opacity: 0;
}

.menu-bar .bottom-content .toggle-switch{
    position: absolute;
    right: 0;
    height: 100%;
    min-width: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    cursor: pointer;
}

.toggle-switch .switch{
    position: relative;
    height: 22px;
    width: 40px;
    border-radius: 25px;
    background-color: var(--toggle-color);
    transition: var(--tran-03);
}
.switch::before{
    content: "";
    position: absolute;
    width: 15px;
    height: 15px;
    border-radius:50% ;
    top: 50%;
    left: 5px;
    transform: translateY(-50%);
    background-color: var(--sidebar-color);
    transition: var(--tran-03);
}

body.dark .switch::before{
    left: 20px;
}



/* 设置右边主区域 */
::selection{
    background-color: var(--primary-color);
    color: #fff;
}

.home{
    /* padding-left: 10px; */
    position: absolute;
    top: 0;
    left: 250px;
    height: 100vh;
    width: calc(100% - 250px);
    background-color: var(--body-color);
    transition: var(--tran-03);
}

.sidebar.close~.home{
    left: 78px;
    height: 100vh;
    width: calc(100% - 78px);
}

.topbar-wrapper{
    width: 100%;
    padding-left: 10px;
    height: 50px;
    background-color: var(--topbar-color);
}

.topbar{
    width: 100%;
    display: flex;
    justify-content: space-around;
}

.topbar .left-nav{
    width: 400px;
    /* background-color: #fff; */
    display: flex;
    line-height: 50px;
    /* float: left; */
    /* margin-left: 200px; */
    justify-content: space-between;
}



.topbar .left-nav li a:hover{
    color: #ff6700;
}


li{
    list-style: none;
}

 a{
    color: black;
    text-decoration: none;
    display: block;
}




.team{
    height: 0px;
    overflow: hidden;
    transition: height 2s;
    width: 100%;
    background-color: #fff;
    /* border-top: 1px solid rgb(224, 224, 224); */
    position: absolute;
    top:50px;
    left: 0px;
    z-index: 999;
    display: flex;
    justify-content: space-between;
    /* box-shadow: 0 5px 3px rgba(0, 0, 0, .2); */
}


.cube {
    width: 150px;
    height: 150px;
    /* background-color: #bfa; */
    /* margin: 100px auto; */
    margin-top: 100px;
    /* 设置3d变形效果 */
    transform-style: preserve-3d;
    /* transform: rotateX(45deg) rotateZ(45deg); */
    animation: rotate 20s infinite linear;
    /* transform:rotateY(45deg) scaleZ(2); */
}

.cube>div {
    width: 150px;
    height: 150px;
    /* 为元素设置透明效果 */
    opacity: 0.7;
    position: absolute;
}

img {
    width: 100%;
    vertical-align: top;
}

.cube{
    /* float: left; */
    margin-left: 100px;
}

.team-wrapper:hover .team,
.team:hover{
    height: 400px;
    border-top: 1px solid rgb(224, 224, 224);
    box-shadow: 0 5px 3px rgba(0, 0, 0, .2);
}




.box1 {
    transform: rotateY(90deg) translateZ(75px);
}

.box2 {
    transform: rotateY(-90deg) translateZ(75px);
}

.box3 {
    transform: rotateX(90deg) translateZ(75px);
}

.box4 {
    transform: rotateX(-90deg) translateZ(75px);
}

.box5 {
    transform:rotateY(180deg) translateZ(75px);
}

.box6 {
    transform: rotateY(0deg) translateZ(75px);
}

@keyframes rotate {
    form{
        transform:rotateX(0) rotateZ(0)
    }

    to{
        transform:rotateX(1turn) rotateZ(1turn)
    }
}


.team-info{
    margin-top: 30px;
    width: 1000px;
    /* background-color: #bfa; */
    float: right;
    /* margin-left: 40px; */
}

/* 设置个人简介 */
.outer{
    width: 130px;
    /* margin: 50px auto; */
    /* 设置阴影 */
    float: left;
    box-shadow: 0 0 10px rgba(0,0,0,.3);
    margin-right: 15px;
}




/* 设置图片 */
.img-wrapper img{
    width: 100%;
    vertical-align: bottom;
}

.info{
    padding: 0 18px;
    font-size: 14px;
    color: #acaaaa;
}

/* 设置标题 */
.info .title{
    color: #717171;
    font-size: 18px;
    margin: 13px 0 15px 0;
}

/* .info .category{
    font-size: 14px;
    color: #acaaaa;
} */

.info .category i{
    margin-right: 7px;
    margin-left: 4px;
}

/* 设置简介的样式 */
.info .intro{
    margin-left: 4px;
    margin-top: 18px;
    margin-bottom: 18px;
    line-height: 20px;
}



.app{
    position: relative;
}

/* 设置app下的小三角 */
/* .app-wrapper:hover>.app::after{ */
    .app::after{
    content: '';
    display: none;
    /* 设置绝对定位 */
    position: absolute;
    bottom:0;
    left: 0;
    right: 0;
    margin: auto;

    /* display: block; */
    width: 0;
    height: 0;
    /* 设置四个方向的边框 */
    border: 8px solid transparent;
    /* 去除上边框 */
    border-top: none;
    /* 单独设置下边框的颜色 */
    border-bottom-color: #fff;
}

/* .app-wrapper:hover>.app .qrcode{
    display: block;
} */

.app:hover .qrcode,
.app:hover::after{
    display: block;
    height: 148px;
}

/* 设置下载app的下拉框 */
.app .qrcode{
    /* display: none; */
    position: absolute;
    /* left: 22px; */
    left: -30px;
    /* margin-left: -62px; */
    width: 124px;
    /* height: 148px; */
    height: 0;
    overflow: hidden;
    line-height: 1;
    text-align: center;
    background-color: #fff;
    box-shadow: 0 0 10px rgba(0, 0, 0, .3);
    z-index: 999;
    /* transition: ;用于为样式设置过渡效果 */
    transition: height 0.3s;
}

/* 设置二维码图片 */
.app .qrcode img{
    width: 90px;
    margin: 17px;
    margin-bottom: 10px;
}

/* 设置二维码文字 */
.app .qrcode span{
    font-size: 14px;
    color: #000;
}




.topbar .right-nav{
    display: flex;
    line-height: 50px;
}

.topbar .right-nav .login-nav{
    width: 80px;
    justify-content: space-around;
    display: flex;
}

.topbar .right-nav .login-nav a:hover{
    color: #ff6700;
}

.topbar .right-nav .bookshelf{
    margin-left: 100px;
    width: 100px;
    text-align: center;
}

.topbar .right-nav .bookshelf a:hover{
    background-color: #fff;
    color: #ff6700;
}




.cart{
    position: relative;
}

.bookshelf:hover .cart-msg{
    display: block;
    color:#b0b0b0;
}

.cart-msg{
    display: none;
    position: absolute;
    left: -199px;
    width: 300px;
    height: 100px;
    line-height: 1;
    /* text-align: center; */
    background-color: #fff;
    /* box-shadow: 0 0 10px rgba(0, 0, 0, .3); */
    border: 1px solid rgba(0, 0, 0, .1);
    border-top: none;
    z-index: 9999;
}

.cart-msg span{
    display: block;
    margin-top: 43px;
    font-size: 14px;
}





.home .text{
    font-size: 30px;
    font-weight: 500;
    color: var(--text-color);
    padding: 12px 60px;
}



/* body.dark .home .text{
    color: var(--text-color);
} */

body.dark .home{
    color: var(--text-color);
}


.showbook{
    width: 100%;
    /* background-color: #bfa; */
    padding: 10px;
}

.showbook .book-list{
    width: 100%;
    /* justify-content: space-around; */
    /* flex-wrap: wrap; */
    display: flex;
    justify-content: space-around;
    margin-bottom: 50px;

}

.showbook .book-list .book{
    width: 200px;
    height: 300px;
    background-color: var(--topbar-color);
    box-sizing: border-box;
}

.showbook .book-list .book:hover{
    outline: 1px solid rgba(0, 0, 0, .3);
    
}

.showbook .book-list .book img{
    width: 198px;
    height: 200px;
}

.book .stock{
    padding-left: 10px;
    padding-top: 10px;
    color: red;
    font-size: 20px;
    font-weight: normal;
    line-height: 50px;
}



.book-bottom{
    display: flex;
    justify-content: space-between;
    font-size: 14px;
}

.book-bottom .book-info{
    padding-left: 10px;
}

.book-bottom .book-todo{
    padding-right: 10px;
}

.book-bottom .book-info .book-author{
    margin-top: 5px;
}




.book-bottom .book-todo .toborrowbook{
    margin-top: 5px;
}

.book-bottom .book-todo .toborrowbook a:hover,
.book-bottom .book-todo .tobookshelf a:hover{
    color: #ff6700;

}

.page-nav-wrapper{
    width: 100%;
    line-height: 50px;
    /* background-color: springgreen; */
    background-color: #65c0bb;
    display: flex;
    justify-content: center;
}

.page-nav{
    width: 60%;
    height: 50px;
    display: flex;
    justify-content: space-between;
}

.page-nav .page-info{
    width: 25%;
    display: flex;
    justify-content: space-around;
}

.page-nav .pagination{
    width: 40%;
    display: flex;
    justify-content: space-between;
}


.page-nav .pagination .page-item{
    width: 100%;
    text-align: center;
}


.page-nav .pagination .page-item:hover{
    background-color: #fff;
}